package com.imyours.webservice.services;

import java.util.Map;

import com.imyours.model.user.UserEntity;
import com.imyours.users.session.UserSessionManager;
import com.imyours.webservice.service.Context;
import com.imyours.webservice.service.ContextService;

public class TestService extends ContextService {

	public TestService(Context context) {
		super(context);
	}

	public void execute() {
		
		boolean loged = false;
		String sessionID = (String) context.getParameter().get("sessionid");
		
		UserEntity ue = UserSessionManager.getInstance().getUser(sessionID);
		if(ue!=null){
			loged = true;
		}
		Map<String,Object> result = context.getResult();
		
		result.put("session is valid",loged);
		
		

	}
}
